(function ($) {
    $.fn.validationEngineLanguage = function () {
    };
    $.validationEngineLanguage = {
        newLang:function () {
            $.validationEngineLanguage.allRules = {
                "required":{
                    "regex":"none",
                    "alertText":'* 此处不可空白',
                    "alertTextCheckboxMultiple":'* 请选择一个项目',
                    "alertTextCheckboxe":'* 您必须钩选此栏',
                    "alertTextDateRange":'* 最少 '
                },
                "minSize":{
                    "regex":"none",
                    "alertText":'* 最少 ',
                    "alertText2":' 个字符'
                },
                "maxSize":{
                    "regex":"none",
                    "alertText":'* 最多&nbsp;',
                    "alertText2":' &nbsp;个字符'
                },
                "groupRequired": {
                    "regex": "none",
                    "alertText":'* 手机和电话中必须填一个'
                },
                "equals": {
                    "regex": "none",
                    "alertText":'* 新密码和确认密码不一致'
                },
                "mobile":{
                    "regex":/^0?(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/,
                    "alertText":' * 无效的手机号码'
                },
                "postal":{
                    "regex":/^[0-9][0-9]{5}$/,
                    "alertText":'* 无效的邮政编码'
                },
                "email":{
                    // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
                    "regex":  /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,
                    "alertText":'* 无效的邮箱地址'
                },
                "integer":{
                    "regex":/^[\-\+]?\d+$/,
                    "alertText":'* 不是有效的整数'
                },
                "number":{
                    "regex":/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
                    "alertText":'* 无效的数字'
                },
                "date":{
                    "regex":/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
                    "alertText":' * 无效的日期，格式必需为 YYYY-MM-DD'
                },
                "url":{
                    "regex":/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\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)|\/|\?)*)?$/i,
                    "alertText":'* 错误的URL地址'
                },
                "onlyNumberSp":{
                    "regex":/^[0-9\ ]+$/,
                    "alertText":'* 只能填数字'
                },
                "year":{
                    "regex":/^[12][0-9]{3}$/,
                    "alertText":'* 请输入正确年份'
                },
                "onlyLetterSp":{
                    "regex":/^[a-zA-Z\ \']+$/,
                    "alertText":'* 只接受英文字母大小写'
                },
                "dateFormat":{
                    "regex":/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
                    "alertText":'* 无效的日期格式'
                },
                "ajaxNameCall": {
                    // remote json service location
                    "url": "/register/checkLoginName",
                    // error
                    "alertText": '用户名已被使用',
                    // if you provide an "alertTextOk", it will show as a green prompt when the field validates
                    //"alertTextOk": '用户名可用,
                    // speaks by itself
                    "alertTextLoad": '验证中'
                },
                "ajaxCode": {
                    "url": "/fastShopping/checkCode",
                    "alertText": '验证码错误',
                    "alertTextLoad": '验证中'
                },
                "ajaxUserEmailCall": {
                    // remote json service location
                    "url": "/register/checkRegisterEmail",
                    // error
                    "alertText": '邮箱已被使用',
                    // if you provide an "alertTextOk", it will show as a green prompt when the field validates
                    //"alertTextOk": '邮箱可用,
                    // speaks by itself
                    "alertTextLoad": '验证中'
                }
            };

        }
    };
    $.validationEngineLanguage.newLang();
})(jQuery);
